package com.ruoyi.common.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 操作日志信息对象 sys_oper_log
 *
 * @author yfkj
 * @date 2021-10-12
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysOperLog extends com.ruoyi.common.core.web.domain.BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 操作日志信息主键 */
    @TableField(exist = true)
    @ApiModelProperty(value =  "${comment}")
    private Long operId;
    /** 模块标题 */
    @com.ruoyi.common.core.annotation.Excel(name = "模块标题")
    @TableField(exist = true)
    @ApiModelProperty(value =  "模块标题")
    private String title;
    /** 业务类型(0其它 1新增 2修改 3删除) */
    @com.ruoyi.common.core.annotation.Excel(name = "业务类型(0其它 1新增 2修改 3删除)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "业务类型(0其它 1新增 2修改 3删除)")
    private Integer businessType;
    /** 方法名称 */
    @com.ruoyi.common.core.annotation.Excel(name = "方法名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "方法名称")
    private String method;
    /** 请求方式 */
    @com.ruoyi.common.core.annotation.Excel(name = "请求方式")
    @TableField(exist = true)
    @ApiModelProperty(value =  "请求方式")
    private String requestMethod;
    /** 操作类别(0其它 1后台用户 2手机端用户) */
    @com.ruoyi.common.core.annotation.Excel(name = "操作类别(0其它 1后台用户 2手机端用户)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "操作类别(0其它 1后台用户 2手机端用户)")
    private Integer operatorType;
    /** 操作人员 */
    @com.ruoyi.common.core.annotation.Excel(name = "操作人员")
    @TableField(exist = true)
    @ApiModelProperty(value =  "操作人员")
    private String userName;
    /** 部门名称 */
    @com.ruoyi.common.core.annotation.Excel(name = "部门名称")
    @TableField(exist = true)
    @ApiModelProperty(value =  "部门名称")
    private String deptName;
    /** 请求URL */
    @com.ruoyi.common.core.annotation.Excel(name = "请求URL")
    @TableField(exist = true)
    @ApiModelProperty(value =  "请求URL")
    private String operUrl;
    /** 主机地址 */
    @com.ruoyi.common.core.annotation.Excel(name = "主机地址")
    @TableField(exist = true)
    @ApiModelProperty(value =  "主机地址")
    private String operIp;
    /** 操作地点 */
    @com.ruoyi.common.core.annotation.Excel(name = "操作地点")
    @TableField(exist = true)
    @ApiModelProperty(value =  "操作地点")
    private String operLocation;
    /** 请求参数 */
    @com.ruoyi.common.core.annotation.Excel(name = "请求参数")
    @TableField(exist = true)
    @ApiModelProperty(value =  "请求参数")
    private String operParam;
    /** 返回参数 */
    @com.ruoyi.common.core.annotation.Excel(name = "返回参数")
    @TableField(exist = true)
    @ApiModelProperty(value =  "返回参数")
    private String jsonResult;
    /** 操作状态(0正常 1异常) */
    @com.ruoyi.common.core.annotation.Excel(name = "操作状态(0正常 1异常)")
    @TableField(exist = true)
    @ApiModelProperty(value =  "操作状态(0正常 1异常)")
    private Integer status;
    /** 错误消息 */
    @com.ruoyi.common.core.annotation.Excel(name = "错误消息")
    @TableField(exist = true)
    @ApiModelProperty(value =  "错误消息")
    private String errorMsg;
    /** 操作时间 */
    @com.ruoyi.common.core.annotation.Excel(name = "操作时间")
    @TableField(exist = true)
    @ApiModelProperty(value =  "操作时间")
    private Long operTime;
    public static final String OPER_ID="oper_id";
    public static final String TITLE="title";
    public static final String BUSINESS_TYPE="business_type";
    public static final String METHOD="method";
    public static final String REQUEST_METHOD="request_method";
    public static final String OPERATOR_TYPE="operator_type";
    public static final String USER_NAME="user_name";
    public static final String DEPT_NAME="dept_name";
    public static final String OPER_URL="oper_url";
    public static final String OPER_IP="oper_ip";
    public static final String OPER_LOCATION="oper_location";
    public static final String OPER_PARAM="oper_param";
    public static final String JSON_RESULT="json_result";
    public static final String STATUS="status";
    public static final String ERROR_MSG="error_msg";
    public static final String OPER_TIME="oper_time";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("operId", getOperId())
                .append("title", getTitle())
                .append("businessType", getBusinessType())
                .append("method", getMethod())
                .append("requestMethod", getRequestMethod())
                .append("operatorType", getOperatorType())
                .append("userName", getUserName())
                .append("deptFullName", getDeptName())
                .append("operUrl", getOperUrl())
                .append("operIp", getOperIp())
                .append("operLocation", getOperLocation())
                .append("operParam", getOperParam())
                .append("jsonResult", getJsonResult())
                .append("status", getStatus())
                .append("errorMsg", getErrorMsg())
                .append("operTime", getOperTime())
                .toString();
    }
}
